package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.AgencyCertificationUpdateDTO;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationAuditService;
import com.jzo2o.customer.service.IAgencyCertificationService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Author: liZhiJun
 * @CreateTime: 2025-09-26
 * @Description: 机构实名认证
 * @Version: 1.0
 */

@RestController("agencyCertificationAuditController")
@RequestMapping("/agency/agency-certification-audit")
public class CertificationAuditController {

    @Resource
    private IAgencyCertificationService agencyCertificationService;

    @Resource
    private IAgencyCertificationAuditService iAgencyCertificationAuditService;

    /**
     * 添加认证信息
     *
     * @param agencyCertificationAuditAddReqDTO 机构认证信息
     */
    @PostMapping
    public void addAgencyCertification(@RequestBody AgencyCertificationAuditAddReqDTO agencyCertificationAuditAddReqDTO) {
        agencyCertificationService.addCertification(agencyCertificationAuditAddReqDTO);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("获取最新拒绝原因")
    public RejectReasonResDTO getRejectReason() {
        return iAgencyCertificationAuditService.getRejectReason();
    }

}
